/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-09-26     huger       the first version
 */
#ifndef __BSP_I2C_H__
#define __BSP_I2C_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#include <bsp/bsp.h>


#define AW20036_I2C_BUS_NAME          "i2c1"  /* 传感器连接的I2C总线设备名称 */
#define AW20036_ADDR                  0x3A    /* 从机地址 */

#define page_change_reg   0xf0
#define mode_control_reg  0x01
#define soft_reset_reg    0x02
#define Imax_set_reg      0x03

#define current_switch_reg  0x80

#define HWEN_PIN    GET_PIN(B,4)    //HIGH ACTIVE
#define INTN_PIN    GET_PIN(B,5)    //LOW  ACTIVE

void bsp_i2c_init(void);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* APPLICATIONS_BSP_BSP_I2C_H_ */
